package com.kaibes.web.admin;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class AdminMenuInit {
    
    @Bean
    public AdminMenu homeMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey(AdminMenuRes.MENU_HOME);
        parent.setName("主导航");
        parent.setIcon("");
        parent.setHref("");
        parent.setSort(1);
        return parent;
    }
    @Bean
    public AdminMenu mainMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey(AdminMenuRes.MENU_MAIN);
        parent.setName("业务模块");
        parent.setIcon("");
        parent.setHref("");
        parent.setSort(2);
        return parent;
    }
    @Bean
    public AdminMenu baseMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey(AdminMenuRes.MENU_BASE);
        parent.setName("基础模块");
        parent.setIcon("");
        parent.setHref("");
        parent.setSort(3);
        return parent;
    }
    @Bean
    public AdminMenu userMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey(AdminMenuRes.MENU_USER);
        parent.setName("用户模块");
        parent.setIcon("fas fa-users");
        parent.setHref("");
        parent.setSort(1);
        parent.setParentKey(AdminMenuRes.MENU_BASE);
        return parent;
    }
    @Bean
    public AdminMenu settingMenu() {
        AdminMenu parent = new AdminMenu();
        parent.setKey(AdminMenuRes.MENU_SETTING);
        parent.setName("设置模块");
        parent.setIcon("fas fa-cogs");
        parent.setHref("");
        parent.setSort(Integer.MAX_VALUE);
        parent.setParentKey(AdminMenuRes.MENU_BASE);
        return parent;
    }
    
}
